package hu;

import java.util.ArrayList;

import yonghu.Yonghu;

public class Hu {
	public static ArrayList<Yonghu> QQ = new ArrayList<Yonghu>();
	static{
		QQ.add(new Yonghu("shuo","123456","13888888888"));

	}
	public boolean deng(String a,String b){
		for(int i=0;i<QQ.size();i++){
			if(QQ.get(i).getMing().equals(a)){
				if(QQ.get(i).getMima().equals(b)){
					return true;
				}
				else{
					return false;
				}
				
			}
		}
		return false;
	}
	public boolean zhu(String a,String b,String c){
		int j=0;
		for(int i=0;i<QQ.size();i++){
			if(QQ.get(i).getMing().equals(a)){
					j=1;
				}
			}
		if(j==1){
			return false;
		}
		else{
			QQ.add(new Yonghu(a,b,c) );
			return true;
		}
		
		}
	
}
